package com.shuda.business.channel.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 数据池数据实体类
 */
@Data
@TableName("t_data_pool_data")
@Schema(name = "DataPoolDataEntity", description = "数据池数据实体")
public class DataPoolDataEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "数据池ID")
    private Long poolId;

    @Schema(description = "数据内容(JSON)")
    private String dataContent;

    @Schema(description = "数据状态(available-可用,processing-处理中,completed-已完成,failed-失败)")
    private String dataStatus;

    @Schema(description = "数据来源")
    private String dataSource;

    @Schema(description = "处理次数")
    private Integer processCount;

    @Schema(description = "最后处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastProcessTime;

    @Schema(description = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    @Schema(description = "创建人")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    private String updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "删除标记(0-正常,1-已删除)")
    private Integer deleted;
}